<dd class="accordion-item" data-accordion-item>
  <a href="#provision_accordion_dd_{{provision_nic_accordion_dd_id}}" class="accordion-title">
    <i class="only-not-active fas fa-chevron-down"/>
    <i class="only-active fas fa-chevron-up"/>
    {{#if options.pci}}
    &nbsp;{{tr "PCI interface"}}&nbsp;
    {{else}}
    &nbsp;{{tr "Interface"}}&nbsp;
    {{/if}}
    <span class="selected_network">
      {{#if options.nic}}
        {{#if options.nic.NETWORK}}
        {{options.nic.NETWORK}}
        {{else}}
        {{options.nic.NETWORK_ID}}
        {{/if}}
      {{else}}
      <span class="label secondary">{{tr "Select a Network"}} </span>
      {{/if}}
    </span>
    <i id="remove_nic_{{provision_nic_accordion_dd_id}}" class="right fas fa-times-circle remove-tab provision_remove_nic"></i>
  </a>
  <div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}" class="accordion-content nic-section-entry" data-tab-content>
    <div class="only_template">
      <div class="row autoContainer">
        {{#if displayType}}
          <fieldset class="small-12 large-6 columns" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_interface_type_section">
            <legend style="margin:0px;">{{tr "Interface type"}}</legend>
            <div style="min-height: 40px;">
              <div class="switch left">
                <input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_interface_type" type="checkbox">
                <label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_interface_type">
                </label>
              </div>
              <label class="left">
                &nbsp;&nbsp;
                {{tr "Alias"}}
                {{{tip (tr "The NIC will be attached as an alias")}}}
              </label>
              &nbsp;&nbsp;
              <span id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_no_alias" class="radius warning label">
              <i class="fas fa-exclamation-triangle"/> {{tr "NIC has alias"}}
              </span>
              <select id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_alias_parent" style="width: 200px; margin-left: 5px"></select>
            </div>
            <div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_alias_external_wrapper" style="min-height: 40px;">
              <div class="switch left">
                <input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_alias_external" type="checkbox">
                <label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_alias_external">
                </label>
              </div>
              <label class="left">
                &nbsp;&nbsp;
                {{tr "Skip network contextualization"}}
                {{{tip (tr "A virtual router can be configured to route SDNAT traffic for this NIC IP address")}}}
              </label>
            </div>
          </fieldset>
        {{/if}}
        {{#if displaySelection}}
        {{#isFeatureEnabled "automatic_selection_vnet"}}
          <fieldset class="small-12 large-6 columns" style="margin:0px;">
            <legend style="margin:0px;">{{tr "Network selection"}}</legend>
            <div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_selection">
              <div class="switch left">
                <input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_mode" type="checkbox">
                <label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_mode">
                </label>
              </div>
              <label class="left">
                &nbsp;&nbsp;
                {{tr "Automatic selection"}}
                {{{tip (tr "The Schedule will decide which is the best virtual network")}}}
              </label>
            </div>
          </fieldset>
        {{/isFeatureEnabled}}
        {{/if}}
      </div>
      <div class="row autoContainer">
        {{#if displayRDP}}
          <fieldset id="rdp_connection" class="small-12 large-6 columns" style="margin:0px;">
            <legend style="margin:0px;">{{tr "RDP connection"}}</legend>
            <div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_rdp_wrapper">  
              <div class="switch left">
                <input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_rdp" type="checkbox">
                <label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_rdp">
                </label>
              </div>
              <label class="left">
                &nbsp;&nbsp;
                {{tr "Activate"}}
                {{{tip (tr "RDP will be enabled in this network")}}}
              </label>
            </div>
          </fieldset>
        {{/if}}
        {{#if displaySSH}}
          <fieldset id="ssh_connection" class="small-12 large-6 columns" style="margin:0px;">
            <legend style="margin:0px;">{{tr "SSH connection"}}</legend>
            <div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_ssh_wrapper">  
              <div class="switch left">
                <input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_ssh" type="checkbox">
                <label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_ssh">
                </label>
              </div>
              <label class="left">
                &nbsp;&nbsp;
                {{tr "Activate"}}
                {{{tip (tr "SSH will be enabled in this network")}}}
              </label>
            </div>
          </fieldset>
        {{/if}}
      </div>
      <div class="auto">
        <fieldset>
          <legend>{{tr "Network Requirements"}}</legend>
          <div class="row">
            <div class="large-12 columns text-center">
              <input type="radio" id="vnet_req" name="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_req_select" value="vnet_select">
              <label for="vnet_req">{{tr "Select Vnets "}}</label>
              <input type="radio" id="custom_req"  name="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_req_select" value="custom" checked>
              <label for="custom_req">{{tr "Custom expression "}}</label>
            </div>
          </div>
          <br>
          <div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_vnetTable" class="net_select" hidden>{{{vnetsTableAutoHTML}}}</div>
          <div class="row">
            <div class="large-12 columns">
              <label for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_SCHED_REQUIREMENTS">
                {{tr "Expression"}}
                {{{tip (tr "Boolean expression that rules out entries from the pool of datastores suitable to run this VM.")}}}
              </label>
              <input type="text" class="SCHED_REQUIREMENTS" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_SCHED_REQUIREMENTS" name="requirements"/>
            </div>
          </div>
        </fieldset>
        <fieldset class="nic_rank">
          <legend>{{tr "Network Rank"}}</legend>
          <div class="row">
            <div class="large-12 columns text-center">
              <input type="radio" id="packingRadio" name="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_rank_select" value="USED_LEASES">
              <label for="packingRadio">
                {{tr "Packing"}}
                {{{tip (tr "Pack the VMs in the vnet to reduce VM fragmentation")}}}
              </label>
              <input type="radio"  id="stripingRadio" name="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_rank_select" value="-USED_LEASES">
              <label for="stripingRadio">
                {{tr "Stripping"}}
                {{{tip (tr "Spread the VMs in the vnets")}}}
              </label>
            </div>
          </div>
          <br>
          <div class="row">
            <div class="large-12 columns">
              <label for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_SCHED_RANK">
                {{tr "Expression"}}
                {{{tip (tr "This field sets which attribute will be used to sort the suitable vnets for this VM")}}}
              </label>
              <input type="text" class="SCHED_RANK" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_SCHED_RANK" name="RANK"/>
            </div>
          </div>
        </fieldset>
      </div>
    </div>
    <div class="no_auto">
      <div class="row collapse">
        {{{vnetsTableHTML}}}
      </div>
      <div class="row">
        {{#if options.forceIPv4}}
          <div class="medium-6 columns">
            <label>
              {{tr "Force IPv4:"}}
              <span class="tip">
                {{tr "Optionally, you can force the IP assigned to the network interface."}}
              </span>
              {{#if options.nic.IP}}
              <input type="text" class="manual_ip4" value="{{options.nic.IP}}"/>
              {{else}}
              <input type="text" class="manual_ip4"/>
              {{/if}}
            </label>
          </div>
        {{/if}}
        {{#if options.floatingIP}}
        <div class="medium-6 columns">
          <label class="inline">
            <input type="checkbox" class="floating_ip" />
            {{tr "Floating IP"}}
            <span class="tip">
              {{tr "If checked, each Virtual Machine will have a floating IP added to its network interface."}}
            </span>
          </label>
        </div>
        {{/if}}
        {{#if options.management}}
        <div class="medium-6 columns">
          <label>
            <input type="checkbox" class="management" />
            {{tr "Management Interface"}}
            <span class="tip">
              {{tr "If checked, this network interface will be a Virtual Router management interface. Traffic will not be forwarded."}}
            </span>
          </label>
        </div>
        {{/if}}
      </div>
      <div class="row">
        {{#if options.forceIPv6}}
          <div class="medium-6 columns">
            <label>
              {{tr "Force IPv6:"}}
              <span class="tip">
                {{tr "Optionally, you can force the IP assigned to the network interface."}}
              </span>
              {{#if options.nic.IP6}}
              <input type="text" class="manual_ip6" value="{{options.nic.IP6}}"/>
              {{else}}
              <input type="text" class="manual_ip6"/>
              {{/if}}
            </label>
          </div>
        {{/if}}
      </div>
      {{#if options.securityGroups}}
      <div class="row collapse">
        <h6>
          {{tr "Security Groups"}}&nbsp;
          <span class="tip">
            {{tr "You can add Security Groups to this network interface. These IDs do not overwrite the ones defined in the Virtual Network. All the Security Group IDs are combined, and applied to the Virtual Machine instance."}}
          </span>
        </h6>
        {{{securityGroupsTableHTML}}}
      </div>
      {{/if}}
    </div>
  </div>
</dd>
